package cn.webrx;


import cn.webrx.entity.User;
import cn.webrx.mapper.DbMapper;
import cn.webrx.mapper.UserMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class Demo {
    @Autowired
    private DbMapper dm;
    @Autowired
    private UserMapper um;

    @Test
    public void t2(){
        QueryWrapper<User> wrapper = new QueryWrapper<>();
        wrapper.eq("username","james");
        User u = um.selectOne(wrapper);
        System.out.println(u);
        System.out.println(um.queryAll());
    }

    @Test
    public void test(){
        System.out.println(System.getProperty("java.version"));
        System.out.println(System.getProperty("java.home"));
        System.out.println(System.getProperty("os.name"));
    }

    @Test
    public void t1(){
        System.out.println("test");
        System.out.println(dm.version());
        System.out.println(dm.dbInfo());
        System.out.println(dm.userInfo());
    }
}
